import request from '@/utils/request'

// 历史执行金额
export function getBudgetStatus(id) {
  return request({
    url: "/system/Financial/getBudgetStatus/" + id,
    method: "get",
  });
}
// 预算新增
export function BudgetAdd(data) {
    return request({
      url: '/system/Financial/BudgetAdd',
      method: 'post',
      data:data
    })
  }
// 预算执行删除
export function BudgetDel(id) {
    return request({
      url: "/system/Financial/BudgetDel/" + id,
      method: "delete",
    });
  }
// 预算执行详细
export function getBudget(id) {
    return request({
      url: "/system/Financial/" + id,
      method: "get",
    });
  }
// 预算执行修改
export function BudgetEdit(data) {
    return request({
      url: '/system/Financial/BudgetEdit',
      method: 'post',
      data
    })
  }
// 预算执行列表
  export function BudgetByDepartmentList(query) {
    return request({
      url: "/system/Financial/BudgetByDepartmentList",
      method: "get",
      params: query,
    });
  }
// 预算生成管理列表
  export function BudgetList(query) {
    return request({
      url: "/system/Financial/BudgetList",
      method: "get",
      params: query,
    });
  }
// 预算执行大类
  export function BudgetCategory() {
    return request({
      url: 'system/Financial/BudgetCategory',
      method: 'get'
    })
}
  // 预算执行小类
  export function BudgetClassify() {
    return request({
      url: '/system/Financial/BudgetClassify',
      method: 'get'
    })
  }
// 预算执行部门
  export function budget_department(query) {
    return request({
      url: '/system/dict/data/type/budget_department',
      method: 'get',
      params: query
    })
  }

  //导入
  export function BudgetIntroduction(data) {
    return request({
      url: '/system/Financial/BudgetIntroduction',
      method: 'post',
      data
    })
  }

  // 预算生成导出
  export function BudgetExport(data) {
    return request({
      url: '/system/Financial/BudgetExport',
      method: 'POST',
      data,
      responseType: "blob"
    })
  }
  // 已办导出 
  export function BudgetFinishedExport(data) {
    return request({
      url: "/system/export/exportElecBudgetForm",
      method: "POST",
      data,
    });
  }
